package com.vchello.service.message;

import java.util.List;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.vchello.bean.message.Message;

/**
 * 
 * @author power
 *
 */
public interface MessageService extends IService<Message> {

	Integer saveMessage(Message message);
	
	List<Message> findMessageByPage(Page<Message> page, Message message);

	Page<Message> findMessageByStatus(Page<Message> page, int receiveUserId);
	
	Page<Message> findMessageBySend(Page<Message> page, int sendUserId);
	
	Page<Message> findMessageByReceive(Page<Message> page, int receiveUserId);
	
	int receiveMessageCount(int userId);
	
	boolean updateRead(int userId);
	
	boolean deleteMessage(Message message);
	
	boolean updateStatus(int id);
	
	Message findById(int id);
}
